cmake_minimum_required(VERSION 3.5)
project(odom_tf_publisher)

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(tf2 REQUIRED)  # Add this line to find tf2 package

add_executable(tf_publisher_node src/tf_publisher_node.cpp)
ament_target_dependencies(tf_publisher_node rclcpp tf2_ros nav_msgs geometry_msgs tf2)

install(TARGETS
  tf_publisher_node
  DESTINATION lib/${PROJECT_NAME})

install(DIRECTORY launch/
  DESTINATION share/${PROJECT_NAME}/launch)

if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  ament_lint_auto_find_test_dependencies()
endif()

ament_package()